package com.msb.mall.product.cofig;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther: huangxiaode
 * @Date: 2023/3/6 0006 - 03 - 06 - 16:47
 * @Description: com.msb.mall.product.cofig
 * @version: 1.0
 */
@Configuration
public class MyRedisConfig {
    @Bean
    public RedissonClient redissonClient(){
        Config config = new Config();
        //配置连接胡信息
        config.useSingleServer().setAddress("redis://192.168.32.101:6379");
        RedissonClient redissonClient = Redisson.create(config);
        return redissonClient;
    }
}
